package com.jsu.clubmanagementsystem.model.vo.review;

import com.jsu.clubmanagementsystem.model.entity.Review;
import com.jsu.clubmanagementsystem.model.vo.user.UserVO;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.Date;

@Data
public class ReviewVO implements Serializable {
    /**
     * id
     */
    private Long id;

    /**
     * 审核人用户对象
     */
    private UserVO userVO;

    /**
     * 申请类型: 0~10
     */
    private Integer type;

    /**
     * 申请id
     */
    private Long applicationId;

    /**
     * 审核意见
     */
    private String content;

    /**
     * 创建时间(审核时间)
     */
    private Date createTime;

    /**
     * 审核结果: 0-待审核, 1-通过, 2-拒绝
     */
    private String result;

    private static final long serialVersionUID = 1L;

    public static ReviewVO objToVo(Review review) {
        ReviewVO reviewVO = new ReviewVO();
        BeanUtils.copyProperties(review, reviewVO);
        return reviewVO;
    }
}